.class public final Lcom/instagram/android/foursquare/c;
.super Lcom/instagram/android/d/k/c;
.source "NearbyVenuesRequest.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/instagram/android/d/k/c",
        "<",
        "Lcom/instagram/android/foursquare/d;",
        ">;"
    }
.end annotation


# instance fields
.field private final a:Ljava/lang/String;

.field private final b:Landroid/location/Location;


# direct methods
.method public constructor <init>(Landroid/location/Location;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 20
    invoke-direct {p0}, Lcom/instagram/android/d/k/c;-><init>()V

    .line 21
    iput-object p1, p0, Lcom/instagram/android/foursquare/c;->b:Landroid/location/Location;

    .line 22
    iput-object p2, p0, Lcom/instagram/android/foursquare/c;->a:Ljava/lang/String;

    .line 23
    return-void
.end method


# virtual methods
.method public a()Lcom/instagram/android/d/b/a;
    .locals 1

    .prologue
    .line 27
    sget-object v0, Lcom/instagram/android/d/b/a;->b:Lcom/instagram/android/d/b/a;

    return-object v0
.end method

.method public a(Ljava/lang/String;)Lcom/instagram/android/foursquare/d;
    .locals 3
    .parameter

    .prologue
    .line 51
    :try_start_0
    new-instance v0, Lcom/instagram/android/foursquare/d;

    invoke-static {}, Lcom/instagram/android/service/f;->a()Lcom/instagram/android/service/f;

    move-result-object v1

    invoke-direct {v0, v1, p1}, Lcom/instagram/android/foursquare/d;-><init>(Lcom/instagram/android/service/f;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 56
    :goto_0
    return-object v0

    .line 52
    :catch_0
    move-exception v0

    .line 53
    const-string v1, "NearbyVenuesRequest"

    const-string v2, "Unable to parse venues"

    invoke-static {v1, v2, v0}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 56
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public a(Lcom/instagram/android/d/b/c;)V
    .locals 3
    .parameter

    .prologue
    .line 37
    iget-object v0, p0, Lcom/instagram/android/foursquare/c;->a:Ljava/lang/String;

    if-eqz v0, :cond_0

    .line 38
    const-string v0, "search_query"

    iget-object v1, p0, Lcom/instagram/android/foursquare/c;->a:Ljava/lang/String;

    invoke-virtual {p1, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 41
    :cond_0
    invoke-static {}, Lcom/instagram/android/foursquare/a;->a()Lcom/instagram/android/foursquare/a;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 42
    const-string v0, "foursquare_access_token"

    invoke-static {}, Lcom/instagram/android/foursquare/a;->a()Lcom/instagram/android/foursquare/a;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/android/foursquare/a;->d()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 45
    :cond_1
    const-string v0, "latitude"

    iget-object v1, p0, Lcom/instagram/android/foursquare/c;->b:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 46
    const-string v0, "longitude"

    iget-object v1, p0, Lcom/instagram/android/foursquare/c;->b:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLongitude()D

    move-result-wide v1

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/instagram/android/d/b/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 47
    return-void
.end method

.method public f()Ljava/lang/String;
    .locals 1

    .prologue
    .line 32
    const-string v0, "location_search/"

    return-object v0
.end method
